import request from '@/utils/request'

// 区域，街道
export function getRegionTree() {
  return request.get('/ajapi/region/regionTree')
}

// 小区
export function getCommunity(region) {
  return request.get('/ajapi/community/list',
    {
      params: {
        region
      }
    }
  )
}


// 提交
export function addHouseVerify(data) {
  let formData = {
    ...data,
    region: data.street,
  }
  return request.post('/ajapi/houseVerify/addHouseVerify',
    formData
  )
}

//发短信
export function sendSignUpCaptcha(phone) {

  return request.get('/ajapi/sms/sendSignUpCaptcha',
    {
      params: {
        phone
      }
    }
  )
}

// 头部统计
export function getHouseVerifyVariousData() {

  return request.get('/ajapi/houseVerify/getHouseVerifyVariousData'

  )
}


// 已报名  列表 10
export function getLatestHouseVerify(num=10) {

  return request.get('/ajapi/houseVerify/getLatestHouseVerify',
    {
      params: {
        num
      }
    }
  )
}


// 获取报名信息
export function getHouseVerifyPersonaInfo() {
  return request.get('/ajapi/houseVerify/getHouseVerifyPersonaInfo')
}



export function miniLogin(data) {
  return request.post('/ajapi/mini/login',data)
}
